﻿
@using WxxMail.MVC.Models
@model AnswerListModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<button id="newEventBtn" type="button" class="btn btn-outline btn-primary" data-toggle="modal" data-target="#eventModal">
    <i class="fa fa-plus"></i>
</button>
   <!-- BEGIN: modal -->
<div class="modal fade" id="eventModal" tabindex="-1" role="dialog" aria-labelledby="eventModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="eventModalLabel">Create New Event</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="title">Title</label>
                        <input type="text" class="form-control" id="title" placeholder="event title" required>
                    </div>
                    <div class="checkbox">
                        <label class="switch">
                            <input class="hidden" type="checkbox" id="allDay">
                            <i class="fa fa-lg text-wisteria"></i>
                            All day
                        </label>
                    </div>
                    <div class="form-group">
                        <label for="start">Start</label>
                        <input class="form-control" id="start" data-plugin=flatpickr data-enable-time=true required>
                    </div>
                    <div class="form-group">
                        <label for="end">End</label>
                        <input class="form-control" id="end" data-plugin=flatpickr data-enable-time=true>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" id="deleteEventBtn">Delete Event</button>
                <button type="button" class="btn btn-success" id="updateEventBtn" data-dismiss="modal">Update Event</button>
                <button type="button" class="btn btn-primary" id="createEventBtn" data-dismiss="modal">Create Event</button>
            </div>
        </div>
    </div>
</div>
<!-- END: modal -->
<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-sm-12">
            <div class="box">
                <header>
                    <h3>Datatable</h3>
                    <div class="box-tools">
                  
                    </div>
                </header>
                <div class="box-body">
                    <table data-plugin="datatables" class="table table-striped table-bordered" style="width:100%"  cellspacing="0">
                        <thead>
                            <tr>
                                <th><input type="checkbox" id="checkall" class="group-checkable" /></th>
                                <th>Position</th>
                                <th>Office</th>
                            
                            </tr>
                        </thead>
                        <tfoot>
                            <tr>
                                <th>Name</th>
                                <th>Position</th>
                                <th>Office</th>
                               
                            </tr>
                        </tfoot>
                        <tbody>
                           
                            @foreach (var m in Model.answerlist)
                            {
                                <tr>

                                    <td><input type="checkbox" class="checkboxes" name='ids' value='@m.AnswerId' /></td>
                                    <td>@Html.DisplayFor(modelItem => m.AnswerContent)</td>
                                    <td>@m.BestNum</td>
                                </tr>

                            }
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
    Launch demo modal
</button>


<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>

            <div class="box-body collapse in">
                <form class="form-horizontal" action="/Home/AddAnswer" method="post">
                    <div class="form-group">
                        <label for="text1" class="col-sm-2 control-label">AnswerId</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="text1" name="AnswerId">
                        </div>
                    </div>
                    <hr class="b-s-dashed">
                    <div class="form-group">
                        @Html.ValidationMessage("AnswerId")
                    </div>
                    <hr class="b-s-dashed">
                    <div class="form-group">
                        <label for="text1" class="col-sm-2 control-label">AnswerContent</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="pass1" name="AnswerContent">
                        </div>
                    </div>
                    <hr class="b-s-dashed">
                    <div class="form-group">
                        @Html.ValidationMessage("AnswerContent")
                    </div>
                    <hr class="b-s-dashed">
                    <div class="form-group">
                        <label for="textarea1" class="col-sm-2 control-label">BestNum</label>
                        <div class="col-sm-10">
                            <textarea class="form-control" rows="3" id="textarea1" name="BestNum"></textarea>
                        </div>
                    </div>
                    <hr class="b-s-dashed">
                    <div class="form-group">
                        @Html.ValidationMessage("BestNum")
                    </div>
                    <hr class="b-s-dashed">

                    <input type="submit" value="提交" />
                </form>
            </div>


            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>